export default {
    namespaced: true,
    state() {
        return {
            profile: {
                id: '',
                avatar: '',
                nickname: '',
                username: '张三',
                mobile: '',
                token: ''
            }
        }
    },
    getters: {
        newName (state) {
            return state.profile.username + '!!!! getters'
        }
    },
    mutations: {
        // 修改用户信息
        setProfile(state, profile) {
            state.profile = profile
        },
        updateName (state) {
            state.username = 'cartModule ++++ mutations'
        }
    }
}
